On the Transformational Derivation of an Efficient Recognizer for Algol 68
نویسنده
چکیده
During the sixties two level van Wijngaarden grammars (2vwg) were introduced for the formal definition of Algol 68. Two level van Wijngaarden grammars provide a formalism suited for writing rigorous formal definitions which read like human prose. Both the context free and context sensitive syntax of Algol 68 are defined in 2vwg. However, the specification is not executable. The Extended Affix Grammar (eag) formalism is closely related to 2vwg. Any 2vwg can be simulated in eag. From a given eag an exact recognizer for the language defined by the eag can be derived automatically. Termination of such a recognizer is guaranteed if certain liberal well-formedness conditions are satisfied. However, in general some effort is necessary to enforce well-formedness. cdl3 is a programming language which rides the borderline between affix grammars and programs. It can be seen as a deterministic version of eag. From a grammar in cdl3 efficient parsers can be generated. Specifications in 2vwg and eag often are of a declarative nature. Our purpose is to derive efficient parsers from such a language specification in a transformational way. We have generalized well known transformations techniques for making context free grammars top down parsable to two level grammars. Furthermore, we have defined transformations for applying the well-known unfold/rearrange/fold-technique on specifications which are formulated as a two level grammar. These transformations can be used for imposing stronger well-formedness conditions on a two level grammar and for operationalizing declarative constructs in the grammar. As a case study, we have undertaken an attempt to derive a new specification for Algol 68 in eag by applying language preserving transformations to the original grammar. Secondly, we have tried to make the resulting eag deterministic in order to obtain an efficient recognizer in cdl3.
منابع مشابه
36 Algorithm
Algol 68 is considerably more difficult to learn than Pascal, partly due to the unusual terminology of Algol 68, which has not been widely accepted. The defining document of Algol 68 is much more elaborate and precise than the Pascal Report, but is also much more difficult to understand than the shorter and less formal Pascal document. This applies, in particular, to the two-level context-sensi...
متن کاملThe Role of Transformational Leadership, Individual Motivation and Knowledge Sharing in the Innovative Work Behavior of Public Library Staff of Fars Province
Purpose: The purpose of this study is to determine the effect of transformational leadership, with the mediating role of individual motivation and knowledge sharing, on the innovative work behavior of public library staff of Fars province. Method: The present research is an applied study that was conducted using the descriptive-survey method. The statistical population of this study included t...
متن کاملHigher Derivations Associated with the Cauchy-Jensen Type Mapping
Let H be an infinite--dimensional Hilbert space and K(H) be the set of all compact operators on H. We will adopt spectral theorem for compact self-adjoint operators, to investigate of higher derivation and higher Jordan derivation on K(H) associated with the following cauchy-Jencen type functional equation 2f(frac{T+S}{2}+R)=f(T)+f(S)+2f(R) for all T,S,Rin K(H).
متن کاملAckermann’s Function: a Study in the Efficiency of Calling Procedures
A six line recursive procedure is used to assess the efficiency of the procedure calling mechanism in ALGOL-like languages. The results from some 40 systems varying from ALGOL 68 and PL/I to System Implementation Languages for minicomputers are presented and compared. A hundred to one variation in performance occurs with this test, the major reasons for which are given. Received April 17, 1975....
متن کامل